import request from '@/utils/request'

// 查询住院通知单列表 (分页)
export function selectPageHospitalizationNotice(query) {
    return request({
        url: '/business/HospitalizationNotice/selectPage',
        method: 'get',
        params: query
    })
}

// 查询住院通知单列表 (不分页)
export function listHospitalizationNotice(query) {
    return request({
        url: '/business/HospitalizationNotice/list',
        method: 'get',
        params: query
    })
}

// 查询住院通知单详细
export function getHospitalizationNotice(noticeId) {
    return request({
        url: '/business/HospitalizationNotice/' + noticeId,
        method: 'get'
    })
}

// 新增住院通知单
export function addHospitalizationNotice(data) {
    return request({
        url: '/business/HospitalizationNotice',
        method: 'post',
        data: data
    })
}

// 修改住院通知单
export function updateHospitalizationNotice(data) {
    return request({
        url: '/business/HospitalizationNotice',
        method: 'put',
        data: data
    })
}

// 删除住院通知单
export function delHospitalizationNotice(noticeId) {
    return request({
        url: '/business/HospitalizationNotice/' + noticeId,
        method: 'delete'
    })
}


// 查询患者入院基本信息如果存在直接插patvisitIndex，不存在查patMasterIndex信息
export function getHosPatientInfo(query) {
    return request({
        url: '/business/HospitalizationNotice/getHosPatientInfo',
        method: 'get',
        params: query
    })
}